<?php

//计算时间差
//author:化缘

header("Content-type: text/html; charset=utf-8");

//时间转化函数，把12::30转化成12.5
function changehoures($time){
   $gettime = substr($time,10,6);
   $houres = substr($gettime,0,3);
   $minute=  substr($gettime,4)/60;
   $workhoures=$houres+$minute;
   return $workhoures;
  
}

//计算时间差

function getworkhoures($timebegin,$timeend){
	$time1=changehoures($timebegin);
	$time2=changehoures($timeend);
	$alltime=(double)$time2-(double)$time1;
	
	return $alltime;

}

?>